﻿using CardPlay.Model.CardModel;
using CardPlay.Model.GameModel;
using CardPlay.Model.GameModel.Actions;

namespace CardPlay.DemoPack.Games.FortyThievesVariants
{
    [Game("31D36D18-EB65-4080-BD01-EAE7602726EB", LevelOfDifficulty.Medium, LevelOfSkill.ModerateSkill, DurationOfPlay.Within5To10Minutes, NumberOfDecks = 2, Family = FamilyName)]
    public class NumberTen : FortyThieves
    {
        public NumberTen()
        {
            TableauDealFormat = "2 down;2 up";
            TableauBuildSequence = CardFaceSequence.AlternatingColorDescendingRank;
        }

        protected override bool AllowedToPickupAtTableau(RemovePileAction action)
        {
            return action.IsActingOnFaceUpTopPileInSequence(TableauBuildSequence);
        }

        protected override void OnTransactionEnding()
        {
            this.FlipFaceDownTopCardsInPilesMatching(AnyTableau);
        }
    }
}